home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_01_05
/
1n05063a
< prev
next >
Wrap
Text File
|
1990-05-08
|
460b
|
34 lines
#include <stdio.h>
#include <stdlib.h>
#ifdef __ZTC__
/*
#define NO_HANDLE 1
*/
#include <handle.h>
#else
#define __handle
#define handle_calloc(a) calloc((a),1)
#endif
main()
{
int i;
void __handle *p;
i=0;
for ( ; ; )
{
printf("%d\r",i++);
p=handle_calloc(500);
if ( p == NULL )
break;
}
printf("\nAllocated %d items\n", i);
printf("Allocated %ld bytes\n", (long) i * 500 );
}